Hrmm, I am mad suspicious about those update+innerjoin queries in the wormholeCritical event.
Again, not an expert in innodb and hard to say without the query planner, but according to this gentleman, you might be locking way more of the table rows than you expect: https://stackoverflow.com/questions/6664667/mysql-innodb-locks-on-joined-rows/12251122#12251122
You could try using a with clause, it might help hint the query planner to reduce the amount of rows locked by divorcing the...
Read more