The upgrade to a higher version requires money, as specified on the official website. If you still have the software, access the page and add to cart the version you need. The developers will ask you about the initial purchase to confirm eligibility for upgrade.
Official website: http://www.asksam.com/products/
For the second part with the database, try exporting it from the version 5 and then use the Import function to bring it to version 7.