Job 5:26:

Thou shalt come to thy grave in a full age, like as a shock of corn cometh in in his season.

Notes on Job 5:26:

This blessing was contingent upon being someone whom God corrects (i.e., someone who allows God to correct him) as is evident from the context (Job 5:17).

I do realize that statements from “Job’s comforters” represent their recorded opinions, which were not always true.  For example, untrue statements are truly recorded about how Job supposedly was a wicked oppressor, which he was not.  Also, the comforters’ understanding of what was going on was flawed; they thought Job was being published for wickedness.  Still, this Scripture is worth noting, as it shows that even before the Law of Moses, being on right terms with God was linked to long life in people’s minds.

See also:

Some of God’s Promises Have Conditions