UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hogxxu9gcXcs7jK4p2PS66SMesSR7hLYYQBnfto+n6Y='
WHERE
key_id = '5773097a77b840157b3eedfefc0b41b5a91b2ab2532d2decd5f69867a38ec0b8'
AND (
token = 'Hogxxu9gcXcs7jK4p2PS66SMesSR7hLYYQBnfto+n6Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)