If with your laptop you able to install RAM memory yourself, like to add more RAM or upgrade RAM, then that shouldn't void your Warranty.
Cleaning your laptop shouldn't also void your Warranty unless you damaged the Laptop during the cleaning process.
Did Lenovo Support say your Warranty was voided because you opened the rear laptop's panel to gain access to the RAM Memory to clean it?
I don't know Lenovo's Warranty Terms & Conditions but as long as it wasn't Customer Error your Warranty should be valid.
Replacing the Laptop Motherboard will probably cost almost as much as a new Laptop (Labor & Parts) unless you do it yourself.
Note: you didn't mention about cleaning the RAM voiding your Lenovo Warranty in your original post.