How to filter out expired content from MultiRepoConnection - query

Enonic version: 6.15.5
OS: macOS 10.14.5

We use MultiRepoConnection -> query for our search. The problem is that Expired content is included in the search hits. so when we try to get pageUrl() of expired content we get _/error/404?message=Content+with+id+ +was+not+found+in+branch+%5Bmaster%5D.
branch: ‘master’ is used while creating MultiRepoConnection, yet expired content is queried.
how do I filter out the expired content in the query?

You specify something like publish.to >= today in your query