UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/ATcjxWGjuMyRxiDVHqoZfnOiUkDY6GhQZ5IbW5rJWE='
WHERE
key_id = 'a0575c0224d0d2d712afd16330ca959ff109aac4c5da547d4da9fd30947ba21e'
AND (
token = '/ATcjxWGjuMyRxiDVHqoZfnOiUkDY6GhQZ5IbW5rJWE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)