I would preventatively replace it all: radiator, hoses, water pump, thermostat....everything up to and including the aux water pump.
If the expansion tank is cracked and the rest of the cooling system is original, it's only a matter of time for the rest of it. M54 3.0i X5s are notorious for quickly overheating due to coolant loss and the typical remedy is a new engine. Cooling system is cheap by comparison