If you fall into this category, there are certain forms of cardio that can help you maintain muscle mass and strength whilst keeping the heart and lungs functioning well! A recent study shows that the two forms of cardio that are beneficial for this are cycling and sprints. The main reason for this is that both involve hip extension. Hip extension with resistance (sprinting hard, or cycling with a high gear) is the closest thing you will get to leg exercises like squats. Obviously cycling for hours on end will still not help but short sessions of 20-30 minutes with some intervals in between would work well. The same applies for sprints. Make sure they are maximal sprints and aim for 5 to 10 sets with walking in between for recovery.
Another form of cardio that is often overlooked is circuit training or even strongman training. Bodyweight exercises in a circuit or tire flipping, sled dragging, keg tossing etc, put in a back to back order, will have a big element of cardio but with added strength.
So if strength and muscle is key for you, the next time you do cardio maybe avoid the long run or hours on the cardio machines. Give a short intense burst on the exercise bike a go, a set of sprints in a local field or even a strongman style circuit.