Simplify check for available extension key by using special SQL query instead of

checking all extensions with foreach
5 jobs for task/cleanup-ter-helperi in 7 minutes and 47 seconds (queued for 2 seconds)