UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oo01aFCEhCz2YbgT5qP3JeNC9Wi8n7lbD6ULq7lkLpk='
WHERE
key_id = 'a6f3e9ae309deaa2f8ff63440e55d2ab1166a4510b03a4792ceb2c3efeb9de85'
AND (
token = 'oo01aFCEhCz2YbgT5qP3JeNC9Wi8n7lbD6ULq7lkLpk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)