mysql ERROR 1205: 1205: Lock wait timeout exceeded; try restarting transaction
Some other connection was running something really long - probably longer than 50 seconds.

Possibly another connection is in autocommit=0 mode, but just sitting there, forgetting to do a COMMIT.

If you can, get the PROCESSLIST before it times out.  Also do SHOW ENGINE=InnoDB STATUS;

Provide SHOW CREATE TABLE credentials.  Look for other writes to that table, and check for index usage.