You pass through customs as you ENTER a country... not as you exit.

So your concern is on the wrong end of your trip. Check your itinerary to make sure you have adequate time between your first...