P04, I do this all the time. As a passport stamp junkie, I often do this just to get the stamp, but occasionally, I do some shopping or get a haircut. I just go straight to immigration, put down my duration of stay as 1 hour, show the agent my boarding pass, he laughs, I laugh, "stamp-stamp", and I am on my way. Japanese immigration is very smooth and I have never missed a flight yet.
I just did the same thing for a 2 hour stop in HKG. Out and back. YEAH, more stamps!