UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Je3BNuFXBCL83D5Lxku4cxd28ZucirohEw6Ud813dpo='
WHERE
key_id = '760a892fd0cb83ace0b762c2d5a3b402798a3b5835032c6004041c6248891201'
AND (
token = 'Je3BNuFXBCL83D5Lxku4cxd28ZucirohEw6Ud813dpo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)