Technically, it's not possible to unlock an iPhone that has been updated to iOS 4.1 because there is no unlock available for the iOS 4.1 baseband. Now depending on your situation, there might be a way to unlock your iPhone.
If you are still on iOS 4.0.1 (or even earlier version. ie 3.1.3), then you can use PwnageTool to jailbreak your iPhone while preserving the baseband (see our guide here). This will make sure you update to the latest iOS version but don't update the baseband, which is the key part in unlocking your iPhone...