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