Depends on if you like the car or not and if it's been reliable while you've owned it.
The wife and I just put about £2k into our 2004 320d.
It was on 144k miles when we picked it up in 2011 and has required nothing other than the usual oil, filters, tyres and brakes since then.
It's been a really reliable car and is now about to hit 210k miles.
The two rear shocks were starting to fail, so had all 4 done rather than just 2.
Exhaust needed replacing, standard with age.
All bushes replaced.
Front lower wishbones (practically a consumable on E46).
Tie-rod ends.
Wheel hubs & bearings.
EGR valve.
Replacement gearbox from low mileage clutch.
Clutch + DMF.
Along with the usual oil, filters, ps fluid, coolant, tyres, glow plugs.
Well worth it... he drives better than he did when we got him and he's done a lot of miles
I have a feeling we'll see 300k miles in this car...
I know I'd rather spend £2-3k on a car like that rather than sell it for £500-1000 and take the same money and put it into something worth £3-4k that would be an unknown quantity. Also depends on how much you're wanting to spend on a replacement car.