Had it when I was about 30. Happened along with a nasty urinary tract infection. It's also called a "rebound infection". Took Bactrim for quite a while to get rid of it. If you wear boxers, they don't help either. Gotta keep the boys from movin around. Drink a bunch of water! Ice.
When I was going through medic school they said us boys don't pee enough. Stagnant urine may cause such a deal. That was what supposedly caused my issue.
Told us in the Navy if your urine is lots yellow or heading to brown you ain't consuming enough water. Moving furniture working construction summer and winter always had a lot of water available. I keep water near me in the house and whatever I'm ridin or drivin. RIDE SAFE.