would be better to get it done before you leave the country.. Advance renewal is ok.. Just make sure you do the technical test/inspection.. (should you fail with the inspection, have it repaired then subject it to re-inspection.) Once you passed it, go to traffic dept. and renewed it.. (You have to settle all the fines first before can have it renewed.) Time wise, I strongly recommends you do it in advance... Good luck to you..