Well of course it might be an affair or the beginning of one, but no one, despite the ease at which they can conflate the scenario into being similar to ones that have been affairs, knows for sure.
Equally, it can be entirely fine, like thousands of different sex/age group friendships that are going on all the time.
For example, I worked for about 5 years in a job where I would guess 30% of the team were women in their 20s (I was in my late 40s at the time, and am male, for relevance) I was friends with two due to our shared enjoyment of a sport, and we trained together and chatted about it (and shock horror, even non-sport-related topics) thru' Facebook. My wife wasn't bothered in the slightest, and there were no ulterior motives between any of us.
Fast forward two years and I'd changed jobs, and met a man who enjoyed the same sport, so we did the same as I had with the two women. The fact that in one scenario it was women, and the second, a man, was purely circumstantial, no-one else we worked with was into that sport, we got on well, so that's how it worked out.
One thing that posters have mentioned a couple of times, was the "what on earth does someone in their 40s and someone in their 20s have to talk about?"
I must admit I'm at a loss with this thinking. Do people in their 40s only talk about mortgages, old age, and the war in Ukraine, and those in their 20s only talk about Taylor Swift, make-up, and Harry Styles?
I have two grown-up children in their 20s, I'm now in my 50s and we have in-depth discussions about politics, sport, the environment, and 100s of other things. While I agree that a romantic relationship with someone that much younger would be my idea of hell, friendships, conversations, and shared pursuits are totally believable, and there's not so much of a difference between the age groups as human beings, that would prevent that. In fact, the difference in perspective between generations can be more interesting, rather than less so.
But OP, if you are worried, I would go on the walk, not as a spying, or marking your territory type thing, but just to share both an activity and friendship your partner has. If you still come away worried, then that's different, because, obviously, people can be shits, and you shouldn't be oblivious to the possibility.