UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gq7lreHqSosVaV8LWmpskDLeS/z4fOcJmUUpdVGBk+0='
WHERE
key_id = '55569766e45e0358fd89e5bdc914ad0c957ff0eb12ac63cc7ef54d0a6d09e8e3'
AND (
token = 'Gq7lreHqSosVaV8LWmpskDLeS/z4fOcJmUUpdVGBk+0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)