UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LSBnHTDibfce1XbBV36wHRKnEiIRvt0mkKThJ/itD2A='
WHERE
key_id = '9e7da020678d7c4ae1190781ef851974f4c67bda9aa62b1d2b0784c4fd66c9e7'
AND (
token = 'LSBnHTDibfce1XbBV36wHRKnEiIRvt0mkKThJ/itD2A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)