Only thing to be added to what the posters before me wrote is that you should have already OLCId for your LH flight when getting to the check-in counter at SFO, so that you can show them your boarding pass. Obviously, all of the above (boarding pass available for the connecting flight, asking nicely

) are equally valid for the return ex FRA. Good luck!