Hi Navi.
Neither of these sentences seems correct to me. Something seems missing in both.
He is playing the guitar, as he did when he was twenty years old.
This expresses the idea that he has recently taken up the habit of playing the guitar again, something that he did when he was twenty years old.
In this case you need the comma because of the subordinate clause modifies the entire dependent clause.
He is playing the guitar as well as he did when he was twenty years old.
His ability to play the guitar has not diminished. He is still playing as well as he did when he was twenty.
In this case you do not need the comma because you are describing the way that he is playing.