By “joke”, I mean a setup with a punch line, not a retelling of a prank or deception of some kind. The oldest joke I know is from chapters 85-87 of The Satyricon by Petronius, circa 61 AD.
Here’s the modern version.
When the traveling salesman’s car broke down, he stopped at a farmhouse. The farmer said the only place he could sleep was with his daughter and warned the salesman to keep his hands off her. They went to bed and he made a tentative pass. She said, “Stop that or I’ll call my father!” But... she moved closer.
After more tries and increasingly feeble protests, finally he succeeded, and found her an accomplished and willing lover. Shortly thereafter, she tugged on his pajama sleeve, and said, “Could we do that again?”
After he drifted off, she awoke him and asked for yet another round of torrid lovemaking. He obliged, but not being the man he once was, fell back asleep at once. Again, he found himself being shaken by the girl, asking for yet another round. He turned over, facing away from her, pulled the covers over his head, and said, “Stop that, or I’ll call your father!”
In Petronius (tr. W. C. Firebaugh) the traveler (not a salesman) seduces his host’s young son. Note that he telegraphs the punch line (the original Latin does, too) and thus ruins it.
When I was attached to the Quaestor’s staff, in Asia, I was quartered with a family at Pergamus. I found things very much to my liking there, not only on account of the refined comfort of my apartments, but also because of the extreme beauty of my host’s son. For the latter reason, I had recourse to strategy, in order that the father should never suspect me of being a seducer...
In a few days, a similar occasion brought about the very same conditions as before, and the instant I heard his father snoring, I began pleading with the lad to receive me again into his good graces, that is to say, that he ought to suffer me to satisfy myself with him, and he in turn could do whatever his own distended member desired. He was very angry, however, and would say nothing at all except, “Either you go to sleep, or I’ll call father!” But no obstacle is so difficult that depravity cannot twist around it and even while he threatened “I’ll call father,” I slipped into his bed and took my pleasure in spite of his half-hearted resistance. Nor was he displeased with my improper conduct for, although he complained for a while, that he had been cheated and made a laughingstock, and that his companions, to whom he had bragged of his wealthy friend, had made sport of him. “But you’ll see that I’ll not be like you,” he whispered; “do it again, if you want to!” All misunderstandings were forgotten and I was readmitted into the lad’s good graces. Then I slipped off to sleep, after profiting by his complaisance. But the youth, in the very flower of maturity, and just at the best age for passive pleasure, was by no means satisfied with only one repetition, so he roused me out of a heavy sleep. “Isn’t there something you’d like to do?” he whispered! The pastime had not begun to cloy, as yet, and, somehow or other, what with panting and sweating and wriggling, he got what he wanted and, worn out with pleasure, I dropped off to sleep again. Less than an hour had passed when he began to punch me with his hand. “Why are we not busy,” he whispered! I flew into a violent rage at being disturbed so many times, and threatened him in his own words, “Either you go to sleep, or I’ll call father!”