Well, a car can last as long as it is driven by somebody that cares for it. My 530d is on 293kkm, and still provides endless driving pleasure. I have seen BMWs with half the mileage that were about in half as good a condition as well... so mileage is not always a good indicator of condition (hours or total revs would be better.)
That said, when looking at an e39, I would save myself the headache and save up until I could afford the best sample I can lay my hands on. Rather save another 40k and look for something with the lowest mileage and best condition you can find. And then also make sure you have 30k in the bank for a "motorplan". There WILL be things to fix like control arm bushes, most likely shocks etc etc.