UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'X73gZAVe2uJoSXpP+/iSHowR1mFmxfHeCJ2A0a1gFeQ='
WHERE
key_id = '9bc1a4609580233efa6ae164eb0fcd581820a5aeeff0caa83ed1e8f37a1a300e'
AND (
token = 'X73gZAVe2uJoSXpP+/iSHowR1mFmxfHeCJ2A0a1gFeQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)