I’ve never bought a car in 40 minutes except maybe from a very small dealer where I paid ~$6000 for a used F-150. They had minimal paperwork and I was paying with a check. Usually it’s more like 2 hours.
If buying a car is ever any faster than it used to be it’s probably because they dealer has a good computer system and the people know how to use it. If they don’t know how to use it, things will still take forever, computers just complicate things for ignorant users.
It probably also depends on what state you are in and how many regulations the dealer has to adhere to. And of course each dealer is going to have their set of hoops for you to jump through; do you have to decline extended warranties, paint protection, undercoating, etc multiple times?