UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zCCJNBIAcmz/MrhnJqF8JlKxkqNQa2LjZuqYfy02QGE='
WHERE
key_id = 'ea4513a249f9b4068ee89d6e9fc5d82183b4f9ef933fff2de11fd3a423fdc0e6'
AND (
token = 'zCCJNBIAcmz/MrhnJqF8JlKxkqNQa2LjZuqYfy02QGE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)