Depends on what you do. For most games, 5+ years. For heavily threaded productivity, 0 years since ThreadRipper and Slyake-X would be better suited for that.
Coffee Lake isn't compatible with z170/270, so you'll need a new motherboard too if you choose to upgrade anyway.