UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o38wrTJYiZHJR5/9t7XWLPwLbGTJBRQsDOK7zDjanWo='
WHERE
key_id = '126a4150cc64bdef1ff10910d0a6ac9108f9df60ff70ff3502c3f4e4ad9f43c7'
AND (
token = 'o38wrTJYiZHJR5/9t7XWLPwLbGTJBRQsDOK7zDjanWo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)