This is one of those things where the older language and the newer language differ. The verse Locke is paraphrasing in a modern translation is.
Create in me a clean heart, O God,Psalm 51:10, ESV
and renew a right[b] spirit within me.
However, the text Locke paraphrased is listed beside the sonnet, and is difficult to ascertain what translation this was: the Geneva Bible, not yet written, had the current "right spirit within me". To the modern reader the idea of emotions being in your guts not your heart is odd. It was not to Locke.
Create a cleane hart within me, O God: and renew a stedfast spirit within my bowels.
Sinne and despeir haue so possest my hart,Anne Locke
And hold my captiue soule in such restraint,
As of thy mercies I can fele no part,
But still in languor do I lye and faint.
Create a new pure hart within my brest:
Myne old can hold no liquour of thy grace.
My feble faith with heauy lode opprest
Staggring doth scarcely creepe a reeling pace,
And fallen it is to faint to rise againe.
Renew, O Lord, in me a constant sprite,
That stayde with mercy may my soule susteine,
A sprite so setled and so firmely pight
Within my bowells, that it neuer moue,
But still vphold thassurance of thy loue.