The espresso machine I bought off ebay for spare parts (to repair mine) had a buzzing magnet valve. (And the valve did not close)
It turned out the shower sieve was broken and on every cup the machine flushed coffee into the three way valve.
I used coffee machine degreaser and did a lot of backflushing with a "blind sieve" in the portafilter. With the degreaser buzzing slowly got better until it finally stopped and the valve closed correctly again. I never opened or changed the valve.
It was just dirty.
I'm using the machine I bought for spare parts for half a year now (and of course I replaced the shower sieve, which was about 7 euro or so)
(Oh and the machine is a Rancilio Silvia, my old one is 16y old and the spare parts one around 4y or so)