UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Uk/UkFFd8vIDdHdx8sPNkEeIOcHufBD80CzUEKDOXHk='
WHERE
key_id = '114b1e17e9dd021f1d0af2d5ddfc3949fcfda48cdedbf970f3efd1864c1c721c'
AND (
token = 'Uk/UkFFd8vIDdHdx8sPNkEeIOcHufBD80CzUEKDOXHk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)