The steps below will help you fix the problem easily. This can also be tried for the error code 0x8007232B.
1) Open cmd(command prompt) with administrator rights
2) Type slmgr.vbs –ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (x should be replaced by your 25 digit product key)
3) Hit enter
4) Type slmgr.vbs –ato (This will change the product key)
5) Hit enter