Invalid query: 40001, Deadlock found when trying to get lock; try restarting transaction