UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NLIe/5LJPWjZ7SBXXdvASHM6v5Z5FeHoeiVVK6PMZkU='
WHERE
key_id = 'fc2b579cfdafb839062f8108b544c578382c323a7f262e9e62847eb32f4c125e'
AND (
token = 'NLIe/5LJPWjZ7SBXXdvASHM6v5Z5FeHoeiVVK6PMZkU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)