The best answer depends on many factors, not just the few attributes you listed, and ultimately you will have to choose for yourself.
- 2003 vs 2004
- 540i vs 530i
- old style vs new style (your preference)
- 12k miles vs no miles (how comfortable are you with 12k miles?)
- second hand vs new (how comfortable are you with used cars?)
- sports package vs premium sound (how important is sports package vs sound?)
- steptronic vs ?? (do you want the steptronic on the 530?)
- price of 540i used vs price of 530i new (probably plenty of room on used 540i for negotiating price)
- other options already on 540i vs other options already on 530i
You see, there's no way I can answer this for you in a way that will fully satisfy your needs, wants, and budget. The E39 is mature and has "all the bugs worked out" -- or at least 99.9% of them. The E60 has relatively little field-history and probably some growing pains.
Test drive them both on city roads and on the freeway, preferably under calm and windy conditions. You have the option to lease a 530i for a couple of years if you're concerned about bugs in the new model. If you really like the power, price, and style of the 2003 540i, then that's your car.