You do know that this isn't actually about sex, don't you?
I've been contemplating 40 for a while now, and honestly don't think it's going to bother me all that much - certainly nothing like as much as I thought it would when I was, say, 25. That "time running out" feeling that you're clearly experiencing really isn't the case.
For a start, shagging around isn't all it's cracked up to be, even when you don't already have a lovely life to wreck. You've got a willing man right in your house, who loves you and would probably be delighted at the thought of spicing things up a bit. Together you can bring out the mischief in both of your souls, without having to resort to the cliche of an affair. It wouldn't be exciting, Hollywood stuff. It would be tawdry and grubby and guiltridden.
I think that we're conditioned to equate excitement with sex, but it doesn't have to be like that. Okay, your career as a professional footballer may be over, and modelling may no longer be for you. But there honestly isn't that much that you're too old for. People dream of climbing mountains, running marathons, visiting new cultures, writing books and taking to the stage. You are young enough for all of those things.
I recently came to the startling realisation that - for personal/family reasons that I won't bore you with here - I am about fifteen years younger than I thought I was. I was reading something, and empathising with a certain, older character, when it occurred to me that there was in fact a smaller age gap between me and the younger character. My life had similarities with that of both characters. What made the difference was the aspects that I was choosing - in other words, my own attitude.
By all means, treat 40 as an opportunity to evaluate your life, because that's a great exercise at any age. But don't reduce it to some tired "young = sexy and exciting" cliche.