UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eC8JFUUqhs84QclLIPc+z2Vnu8aGSCigYbH0Ffgk8v0='
WHERE
key_id = '88e3932d42226cad1b2ca026ad4fa955c114d9b6c130551afea23d2d1a724548'
AND (
token = 'eC8JFUUqhs84QclLIPc+z2Vnu8aGSCigYbH0Ffgk8v0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)