I am trying to figure out the correct SKU to perform the upgrade. I found this part number (IPCXIVR-40DB1PS1) but it cannot be ordered. Cisco says you need a higher level part number. So I found IPIVR4.X-ADDON which allows for the above part number, but also requires IPIVR-40-PORT1 or better. Is this correct?
You need to use the Configuration and Ordering tool. It will build the BoM for you.
Note that I do not believe 4.0 can be ordered any longer. It has been EoL for quite some time. The SQL media is version-specific so you cannot use a newer disc on an older install either.