Yes/ maybe. To install the upgrade you will first have to enter the upgrade serial number, if you have a previous version installed on that computer the prior serial number will be recognized and the install will complete. However if there was not a prior install you will then be prompted to enter the serial number of the earlier version. You can upgrade any of LR version 1, 2or 3 to LR 4.
Assuming you installed version 3 with a license code, to upgrade to 4 you will receive a new license code. The version 3 code will not do otherwise it would be too easy to upgrade without paying for it. I bought version 3 and the upgrade to 4. Both have different codes. An upgrade assumes a prior version exists to ... upgrade.