UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '69ZZLC4TUOdMKdbIDIrMCU8BiCQtdbpR50QlkgQsPKo='
WHERE
key_id = '80f6b02ca10cfbc05cafff14871d4aa1d84880c7844db1636e80790a94bdf531'
AND (
token = '69ZZLC4TUOdMKdbIDIrMCU8BiCQtdbpR50QlkgQsPKo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)