How unlocking the iPhone works
The iPhone is a wonderful device - a mobile phone plus a pocket-sized computer. The computer part is a fast, low-power CPU running a version of Apple's OS X, which is unix with clever software on top. The phone part is a second CPU that handles voice and data communications and sound, plus some other tasks. The second CPU is generally referred to as the "baseband." Sometimes that means the whole CPU, but in most case a reference to it is to the part of the chip that holds "firmware."
Firmware, neither hard nor soft, is data and instructions stored inside the chip in a semi-permanent way: It can be read easily add also can be re-written ("flashed") under some conditions, but it retains the information when the phone is turned off and also through the restore process, where an iPhone is wiped clean and reloaded with the same software it had before.
Unlocked phones may or may not be able to take a software update from Apple: We know that reloading the parts of the firmware that the unlock changes DOES re-lock the phone, and an Apple update could easily do that. But the basic method of unlocking should remain valid, so it's likely that a phone can be unlocked again with revised unlocking tools that are made for a new software version from Apple. Only time will tell for sure.