For most workouts a general warm up shouldn’t take that long. It should be efficient regarding the training you are doing and include movements to address your individual needs. However, if you lack flexibility or have some kind of tissue restriction then it may take you longer to warm up. Fixing these issues should be a priority so you may need to dedicate a portion of your workout to increasing mobility and general physical preparedness. There is no point in squatting if you can’t physically squat correctly.
A warm up should include movements to literally warm up the tissue, take the joints through a range of motion, and stimulate the central nervous system. Just riding the bike for 10 minutes isn’t enough. Most people sit for too long during the day so if you are training the lower body you need to spend the time reminding it how it is supposed to move. If you find yourself constantly needed 45 minutes to warm up then you have other issues at play. Yes, for a period of time this may be necessary but you should be able to overcome those issues that are making an extended warm up requisite.