your license will work fine for the 5.1 upgrade. i did the same thing a few months back with no issues. just back up everything first in case the upgrade goes sideways.
Having upgraded from JIRA 4.0 to 5.1 last year, I can share that your existing license key should work without any issues. Atlassian typically maintains compatibility for licenses across major versions. During the upgrade process, JIRA will automatically validate your key. It’s still a good idea to keep a record of your license information, just in case you need to re-enter it later. You likely won’t require a new key unless specific terms have changed or your current license has expired.
Your JIRA 4.0 license key will work with 5.1, as Atlassian ensures compatibility across these major versions. The upgrade process will automatically validate your existing key. However, it’s advisable to note down your license details from the admin panel before proceeding with the upgrade, just in case you encounter any issues. A new license is only required if your current one has expired or if you are changing the type of license. To avoid any surprises, check the expiration date in the admin console first.