MySql Lock Tables Blocking Logic
Do not use LOCK TABLES with InnoDB unless you have a very special need.

Instead, learn about "transactions" and use BEGIN...COMMIT to effect most "locking" needed.  See also SELECT ... FOR UPDATE....