The 4.0.x software was notoriously bad on the 3G model. Apple just did not optimize its performance well enough for it to work fluidly on the older hardware.
Although I haven't tried it, word on the street is that 4.1 works much better on the iPhone 3G than 4.0(.1) ever did, so yes, it would be worth it for you to upgrade.
But we need to be crystal clear about something: you said you don't need for it to be jailbroken, just unlocked. Well, unfortunately, although this was possible with the original iPhone (2G), every subsequent iPhone model REQUIRES that it be jailbroken for the unlock to work/be installed. So you don't have a choice: if you want to use it unlocked, you HAVE to jailbreak it.
Also, this means that you need to be careful while upgrading to 4.1. Although you can upgrade to 4.1 through iTunes the normal way and then apply the jailbreak afterward, if you do that, you will not be able to unlock! This is because the iOS 4.1 upgrade comes with another piece of software: the phone's modem baseband. Currently, only the baseband software that came with 4.0, 4.0.1, and 4.0.2 is unlockable. The baseband software that comes with 4.1 hasn't been unlocked yet. The baseband software is written to a different memory chip than iOS itself is, and once the baseband is upgraded, it can never be downgraded again, and you will lose your unlock! Even if you downgrade iOS back to 4.0, the baseband will stay at the newer version and your unlock will be forefeit.
There is a way to upgrade to iOS 4.1 while keeping the baseband from 4.0. It's called PwnageTool, and you can get it from the iPhone Dev-Team's site at
http://blog.iphone-dev.org/ -- what it allows you to do is to make a custom firmware file that is jailbroken and that doesn't include the baseband update. So if you tell iTunes to upgrade your phone with your custom iOS 4.1 firmware file made with PwnageTool, you are not at risk for losing your unlock.
PwnageTool is ONLY for Macintosh computers. If you have Windows, there is an equivalent program, written by a different group of guys, called Sn0wbreeze. You can download it at
http://ih8sn0w.com/ and the latest version is 2.1. I have never used Sn0wbreeze myself, so if you have Windows and need to choose Sn0wbreeze and run into difficulties or have questions, someone else other than me will probably need to step in and help answer the rest of your questions.
Regardless of whether you use PwnageTool or Sn0wbreeze,
I cannot stress enough that as long as you want your phone to be unlockable,
you must never upgrade or restore your phone using the official Apple software updates. Always,
ALWAYS upgrade your phone
ONLY using custom firmware files made by either PwnageTool or Sn0wbreeze, and make sure when you use these programs to tell it to
leave the baseband upgrade out! And when new Apple iOS software upgrades come out (like 4.2), you need to WAIT until PwnageTool or Sn0wbreeze is updated to support 4.2. DON'T upgrade your phone immediately to 4.2 UNTIL these programs are updated to help you keep your baseband.
As long as you do this, you will be fine and you won't lose your unlock.
Best of luck,
-- Nathan
EDIT: Also note that firmware files made by PwnageTool and Sn0wbreeze are pre-jailbroken. That means that your phone is already jailbroken after you install the custom firmware using iTunes. You don't need to do anything extra to jailbreak it: it's already done, because the jailbreak is built into the custom firmware.
EDIT #2: Make sure to grab PwnageTool from the Dev-Team's site. Not Redsn0w. Redsn0w is a different application (also written by the Dev-Team) that allows you to jailbreak a phone after you have installed the latest official Apple firmware.
This is not what you want. If you upgrade to official Apple iOS 4.1 and then use Redsn0w to jailbreak,
your unlock will be gone because by installing the official/unmodified Apple iOS 4.1 firmware to your phone, you upgraded the baseband, and thus forfeited your unlock.