NOWAIT equivalent in MySQL 5.7 MySQL 8.0 has a new feature to allow a transaction to timeout immediately by throwing an error if it tried to access records that are locked by another transaction instead of waiting for that transaction to commit, or waiting for the time-out.

Is there a way to achieve the same effect in MySQL 5.7?
Server-side SELECT statement timeouts allows:

SET SESSION MAX_EXECUTION_TIME=2000;


Not exactly the same, but close.