first you need to upgrade from 5.1.3 to 5.1.4 and then to 5.1.5 but at the moment i would advise not to upgrade to 5.2.2 as their still seems to be unfixed bugs
If you get your licence direct from WHMCS, open a ticket with them and ask for a free dev. licence. this was you can set up a development install of 5.2.2 and see how it works and find any bugs.