Application-specific passwords only work for a short period of time
This sounds very strange. I've generated a few app-specific passwords (which look like "abcd-efgh-ijkl-mnop") for a few devices and have never heard from them since. Google says: "Application-specific passwords do not expire"

On the other hand, main password, which has to be accompanied with security code ("12345") does expire quite quickly. Please, make sure you use 16-letter app specific passwords, not the main password with security code.