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