UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UWUeu+AmIw88uYT6JPF5Jmwvi3hyFyyJyBK11WOOnG4='
WHERE
key_id = '0c7337057ff19c865f009a73929b9b2b87b8c110242fe5564b50c09b36bf252d'
AND (
token = 'UWUeu+AmIw88uYT6JPF5Jmwvi3hyFyyJyBK11WOOnG4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)