UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aXevNNxJT+D3QZeTDdgp2L9FOWAY0wRKTToj4KPFmDw='
WHERE
key_id = 'c80760ead4e6759a08d6b024414aeede491697dddd48785aab77e2b2744de854'
AND (
token = 'aXevNNxJT+D3QZeTDdgp2L9FOWAY0wRKTToj4KPFmDw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)