"Locking" a table usually means restricting access to the data in the table by other processes during data editing. To protect the table so that it cannot be changed or deleted, I believe that the best solution would be to change the permissions of the table, delete DROP, UPDATE, INSERT and any other permissions that you want to restrict for this particular table.
REVOKE DROP, INSERT, TRUNCATE ON database.table FOR 'user'@'host';
source share