Yes again, if you factory reset and then use the phones update mechanism you will get it to the latest version that was published by Google for this device. That's for the Android version as well as security updates. The updates that were already published don't expire, Google just stops publishing newer ones. Hope that's clear enough.