UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'x3ivtO7s3SWS3W7OTWSAryqrLDxfIeMCFVfbsrIttRc='
WHERE
key_id = 'f7b86ab955f9b2ec0a7f88e6c263b4f0f019fadb6a9e196f5528104f7a3870e9'
AND (
token = 'x3ivtO7s3SWS3W7OTWSAryqrLDxfIeMCFVfbsrIttRc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)