Joseph's revision to John 12:7 possibly contains the earliest written mention of doctrinal foundation of the second anointing.
Note pinned to "New Testament Revision 2" manuscript in the handwriting of Sidney Rigdon, ca. 4 Apr. 1831–24 Mar. 1832 and 20–31 July 1832, The Joseph Smith Papers website, accessed September 6, 2021
7th) Then said Jesus, Let her alone, for she hath preserved this ointment untill now, that she might anoint me in token of my burial