UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7xrPY1lRhVUxmzF4ERf3kfW+Pi/HTTtsD5SO3URNOhw='
WHERE
key_id = '43a7a3a7909fd268e82b54ce3e61f19dd6054aa1513f0d8a898b4c6ce25cb831'
AND (
token = '7xrPY1lRhVUxmzF4ERf3kfW+Pi/HTTtsD5SO3URNOhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)