UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'herA/WLUyvpLevt0uRDODUxokLF5Lj0GpjckJhvpnlw='
WHERE
key_id = '60336617556cb3e38b4c8c3de29de4786a54d2764efa26b21d4c1ebd9c905df9'
AND (
token = 'herA/WLUyvpLevt0uRDODUxokLF5Lj0GpjckJhvpnlw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)