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