You are arriving at Lima on traffic peak hours. It will take no less than 45 minutes to reach Miraflores, Barranco or San Isidro, where good restaurants are located. Same with downtown, maybe less time but traffic is a nightmare between 6pm and 8pm. And traffic is more intense during december, lot of people wait the last minute for christmas shoppings, companies arrange their end of the year celebrations, etc.
And there's another bad new: the express highway of the Costa Verde (near the beaches) has been closes since yesterday to may 2013, due to mantainment and expansion, on the segment from San Miguel (just the entrance when you are coming from the airport to Miraflores) to Magdalena.
And if you are leaving to MIA at 11:55pm, you have to check at 8pm, better at 7pm (specially if you fly by AA).
I know a good restaurant not far from the airport called El Grifo, but it's not open at evening, just for lunch. Maybe another FTalker can recommend a near place. Actually you don't have much time to spare in the city.