fix logic for getting days-since value from config file; correct query to find items not checked since x days [#58717416]