It's always sad to hear, my Gen 1 MPS just had the VVT replaced, when purchased @ 140K it had some chain noise at idle and I wasn't too worried about it. I drove the car without issue (for a couple of years) when @ 165K the idle "tractor" noise couldn't be ignored any more. Went to a Mazda dealer, who did the requisite tests of checking chain slack while the engine was warmed up (see guides on Youtube for this). Ended up paying just under $1500 for the complete VVT overhaul, the side engine mount was also replaced at additional cost. Definately made a difference in drivability and refinement.
IIRC you can purchase a VVT kit for $500 - 700 but factor in labour which takes about one day. I wasn't convinced taking my car to a non-Mazda dealer to save on costs was a good move as it's a fairly difficult job. If you do go to a stealership sound out if they do the VVT replacement often - the first I visited said they had only done it on a couple of CX7s, the next dealer was much more comfortable doing the job.