I do this often when I transit HNL-NRT-ICN or the reverse. I usually arrive in the early afternoon (around 1 or 2 pm) so immigration goes fast. When I get back to the airport, immigration lines are quite long. I find 4 hours enough time to go to Narita, walk around a bit, grab a bite and come back to the airport, though. When I stand in line in immigration to catch my connecting flight, they usually have agents come by with a sign for soon departing flights. I've never had to use them but maybe you could luck out in the event you were a bit late?