The only 2 risks I see is flight delay, and the immgration lines. Fortunately the peak hours for i.l. are between 10pm and midnight. It shouldn't be crowded at 5am; though I have not checked lately, I suggest you should check this webpage tonight, it should show the arrivals for next morning
http://www.lap.com.pe/lap_portal/vue...elo=I&accion=L
so you can get an idea of how crowded the international terminal will be.
Both terminals are on the same building and it's not too far, compared with large US airports. It won't take a lot to walk from one to another.