You may be able to hop a shuttle ride to one of the large airport hotels and leave your bags with the Bell Desk, but I don't think there are any post-9/11 locker facilities at SFO. If you belong to your airline's private lounge, you may be able to leave your luggage there while you explore the airport, but I'm hesitant to recommend going into the City with only a six-hour layover. If you do, you should allow a minimum of 45 minutes transportation time (each way) to reliably get into the City and back (min 90 minutes total) and at least another 90 minutes (and preferably two hours -- longer for an international flight) to work your way through TSA and back to your gate. This will leave you with less than three (and realistically two) hours to do anything in San Francisco itself and you run a very real risk of missing your flight. Check out one of the exhibits or the airport museum instead.
Yes, there a shop by the international G terminal which offers hourly storage service.
Thanks! Your answer is awaiting moderation.