What actors have played the same role for the longest period of time?

Ew.

Actually, he has already played Mark Twain for far longer than Samuel Clemens played Mark Twain. Clemens appeared as Mark Twain for just over 40 years (there’s some argument about exact dates), while Holbrook’s pushing 60 years.

Nicholas Courtney first appeared on Doctor Who as the character Alistair Gordon Lethbridge-Stewart, then a British Army Colonel, in 1968. (He’d had a couple of bit parts as other people in prior seasons.) He continued to play the role opposite Doctors 2-7 on screen, and 8 in the Big Finish audio plays, for decades; in 2008, he made an appearance on the spin-off series The Sarah Jane Adventures. IIRC, he was scheduled to begin filming another one on the revived Doctor Who series itself when he had his final stroke, a few weeks before he passed away last year.