UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cllVqiF3oRCJXKj3Ks1PY7xTlIwKtJ2blf7hwjAsb3A='
WHERE
key_id = '63581ac6e8f3247756d9c9df08a761031d115786ab46924fb44205adc0fa19ad'
AND (
token = 'cllVqiF3oRCJXKj3Ks1PY7xTlIwKtJ2blf7hwjAsb3A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)