UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '72ECgqwRZp5a6BdJ1hB6Z6Sva4ZhgQTWkGP0vjSrjEc='
WHERE
key_id = 'df9c2cebbe4d6cf42474863820e55933c06fdfb6c5ab46b46c4ae5848bb646c2'
AND (
token = '72ECgqwRZp5a6BdJ1hB6Z6Sva4ZhgQTWkGP0vjSrjEc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)