You can simply add the code to your Office 365 account. The term is then extended by 1 year at a time. I have done this several times and currently have a term until 2020. The licences (5) are NOT tied to a specific hardware. You can delete a computer or tablet in your 365 account at any time and then use the licence on another device.
As long as you don't change the hardware of your PC, they are valid indefinitely. As soon as you change something, Microsoft messes around. It's really annoying since they added this "feature".