Follow-up from "Change SQL for expired artifacts to use new ci_job_artifacts.expire_at"
The queries introduced in !16578 (merged) should be removed and replaced with much simpler queries once the artifact migration is completed.
The outer WHERE IN can be removed entirely and the queries massively simplified once the only source of artifacts is the ci_job_artifacts
table.