The other thing is the Gen 4 just came out less than a year ago (Maybe a little more than a year?) So you won't come across any gen 4s that are too old. As far as a gen 3 goes, I wouldn't worry about age. If you buy new, don't worry AT ALL. If you are buying used, I would try and shoot it before you buy it but if everything seems good then go for it.
As to your question, I don't know if there is a way. You might be able to call Glock and give them the serial number and they might check for you. I don't know. Good Luck!