Yo have more than enough time to get your checked bags, have them stored in case they don't get checked all the way (there's a -cheap- paid service right next to the domestic baggage claim exit) and go have a look at Lima. Keep in mind, though, that traffic is a pain both ways, so the amount of time you'll effectively get to do some sightseeing is quite limited
plan leaving for the airport at 11 if you intend to be there at 12
at noon, you should be able to go through security and passport control quite quickly. I've been able to go through in about 10 minutes total at that time of day.