On average Macs can usually update to the latest version of MacOS/OSX for 7-8 years from their release. After that Apple also provides security updates to the previous 2 versions of MacOS/OSX (which basically means another 2 years of security updates). That said the 2017 Macbook Air is a minor refresh of the 2015 Macbook Air and it may only receive updates for the same period as the 2015 model.
Worst case your are probably looking at 2022 for software updates, 2024 for security patches, but there's a good chance it'll be a year or two longer than that.