Buy a turbo trainer.
You won’t get in a good enough workout in 40 minutes on the road (+10 min warm-up before and after the 40mins).
An hour on the turbo trainer is worth two on the road, there are lots of hour long drills you can do on the trainer, S.E’s, intervals, threshold work, all sorts ... and an hour is the right length for the trainer.
The only time I would do an hour training on the road is a recovery session the day after a massive effort.