UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iyT9rn1hbuygNlGoBw6kWPVp8dibPZGhq1gwOX6t7Oc='
WHERE
key_id = '73796bc7af2ac113dbda7353493cb7c2b2e5b1233206d6dc7ee5c900bf0e2f86'
AND (
token = 'iyT9rn1hbuygNlGoBw6kWPVp8dibPZGhq1gwOX6t7Oc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)