UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xiO3YNUPQpx3zW03YyIGJ4iCDGZ9WR7gf2ioOfuXXyE='
WHERE
key_id = '2fb72844ec4b059ab516cc8fff40a620c66ab6354672670983c49176a0e1c3db'
AND (
token = 'xiO3YNUPQpx3zW03YyIGJ4iCDGZ9WR7gf2ioOfuXXyE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)