As someone who has actually.owned and operated lots of vending machines of different types over the years, no this isn't true.
You can buy vending machine locks that are keyed the same if, for example, you wanted all 12 machines that you owned to have locks that could be opened with the same key but the chances of that key opening any random vending machine you may encounter are about as good as your house key working to open your neighbor's house... Not impossible but not super likely.
In fact, just yesterday I picked up a vending machine key that it took a locksmith over two weeks to make for me with only the lock to copy it from because I'd lost my original for that particular machine.
I have several other vending keys that I tried (mainly because I was confident that one of them actually was the right key) but none of them worked.
Vending machine locks and keys are actually quite complex and varied.
Oh, I just noticed that you actually asked how much to change the lock...
They quoted me $35 to drill out the one I lost the key for and replace it with a new one and the corresponding key... I could have done that myself for significantly less by just ordering a replacement lock and key from Amazon, but...
I wanted a duplicate of the original because I do actually have several of these particular type machines that are intentionally keyed the same.