I lost interest in the middle of having sex, while I was inside. Am 45 years of age. Should I be concerned? Never happened before

Emotional. Loss of interest is without a doubt beyond the scope of a urologist. Self assessment and possibly a sex therapist would be very helpful.
Probably normal. Likely an isolated occurrence or may happen occasionally, unles you are getting sexually bored with your partner. Hope not.