I recall having the same problems when I was nursing. It is very uncomfortable, but I would doubt that it was technically mastitis. If unattended, it could lead to mastitis, but it sounds like you took care of yourself and did the right thing.
In the first several weeks when your supply is abundant, this situation occurs more frequently than later on. I'm wondering how you managed to get home without leaking milk all over yourself. I remember several times when this happened to me.
I don't know whether they teach it these days or not, but when I had my kids in the early 1980's, the books still showed and explained how to express milk without a pump. Especially if you have a good let down response, you could use this method in the privacy of a bathroom stall to relieve the pressure until you can get home and either nurse the baby or use your pump to express the excess.
But ... ask your doctor about everything.