UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FWRBppE334LMuXuqmG++djfLswNHVOt7TsoxKT15Eec='
WHERE
key_id = 'b4061bf57b31317543ed9bced120c9e58ae42f496c1ab15510741d07753f49df'
AND (
token = 'FWRBppE334LMuXuqmG++djfLswNHVOt7TsoxKT15Eec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)