Invalid query: Lock wait timeout exceeded; try restarting transaction