When I ask my patients about exercise, they all say that they exercise. When I ask for details, they say they walk every day.
I'm sorry, but walking is not exercise!
If walking doesn't increase your heart rate, it's not exercise. You need to jog. I can't tell you how many patients come in and say that they exercise, and when I inquire further, they say they walk every day. That is not exercise. That's leisure. Some people are limited by back pain, knee pain, ankle pain and can't walk. I recommend trying swimming or doing weight training. Weight training can also elevate your heart rate and it burns a lot more calories.
When we say "exercise" we mean an activity that elevates your heart rate. You need to get your heart rate between 60-80% of your age predicted maximum. Your age predicted maximum heart rate is 220-age. If you are 20 years old, your age predicted maximum is 200. Sixty percent of that, is 120. So, a twenty year old needs to get their heart rate over 120.
When most people walk, they probably don't achieve this 60% threshold. Unless you are extremely out of shape.
And usually, when we say 40 minutes per day, we mean that your heart rate should be over 60% for forty minutes per day. It may take 5 minutes to get your heart rate that high, so you will have to go for an additional 40 minutes, or a total of 45 minutes. If it takes 10 minutes on the treadmill to get your heart rate up, you need to start the 40 minute timer after those ten minutes.
However, if it comes down to walking, or not doing anything at all... please walk! It's better than nothing. And for a lot of people, walking alone does elevate your heart rate.