If the upgrade doesn't work. Make sure your Anti-virus firewall is disabled while you are connected to itunes and downloading the update.
I had Kaspersky anti-virus installed in my machine and it kept blocking the itunes 5.1 update. I disabled my antivirus for a few minutes until I downloaded the new update from apple and it did the trick.
Let me know if this helped.