Uh oh ...
As you get older that can become a more and more common problem. My understanding is that in uncircumcised men, the foreskin can shrink and cause pain as they get older. My friend's father had to be circumcised at 63 because his foreskin would pull so hard he couldn't get an erection. The pain would be unbearable.
I would suggest talking to a doctor. If something needs to be done, it's better to get it done sooner than later.