A couple of things (as already pointed out above.....)
Dehydration - were you out on the amber nectar the night before? Need to top your fluid levels back up but water doesn't cut it. Apple juice is good, or sports isotonic drinks (stay well way from Redbull/Mother/V etc). Drinking water whilst riding is also important, but you must also top up your electrolytes too, as well as eating regularly. Shotz or similar are great, but you've gotta find something YOU can handle. Gels and power bars sit really bad with me, so every 15 minutes I eat a couple of jelly beans (100% carbs!), wash them down with 100-150ml of Electrolyte fluid and 150-200ml water (remember you must have at least 1ltr of fluid per hour of exercise).
Know you body - yep, says it all really. Getting fit will (to some extent) help you out, but no matter how fit you are, you'll still cramp if your body doesn't like what you're doing! If you start cramping, or feel any pain, stop! Take a rest, keep your arms, legs, back, neck etc moving and stretching but more importantly keep warm. 10-15min resting, but continued moving like slow jogging can help stretch/warm your body in different way to riding. Get back on the bike and continue, at a slower pace. If you cramp again.....head home - your mind is probably saying "I can ride another 30km" but your body is saying "P**s off!". Get home, get warm, rub baby oil into your muscles (trust me....it works!) and live to ride another day. If you push on, you'll do more damage, run the risk of losing concentration and end up probably crashing that retro steed you are riding!
Is your bike set up correctly? Yeah, it looks cool and retro to have the seat post fully extended, and a 150mm stem so you're leaning/laying flat, but if you're not comfortable on the bike, your arms are over-extended and your little legs are so stretched that when you pedal your knees are almost locked out and your hips are swaying violently then you will burn more energy, create more lactic acid and generally end up in a world of hurt. Get a bike fit. Good shops do them, it relatively cheap and will probably give you an excuse to buy more retro parts!
I'm no expert, I just like random blurtings from time to time, but I've done enduro MTB racing for a long time (4hrs, 6hrs, 100km etc) and regularly knock out 100-180km road rides....not saying I'm fit or qualified to talk about sports science or biology etc, just my own experiences....hope some, if not all of this can help out fellow riders!