Why do my hip joints hurt sometimes, at age 45?

A guess. I'm guessing but probably you're suffering from hip bursitis. Take a look at this: http://orthoinfo.Aaos.Org/topic.Cfm?Topic=a00409.