Proverbs 10:27:

The fear of the LORD prolongeth days: but the years of the wicked shall be shortened.

See also:

Some of God’s Promises Have Conditions
Is There an Appointed Time for Each Person to Die?