protected function filter($key)
    {
        if (is_array($key)) {
            $key = ['$in' => $key];
        }

        return [
            '_id' => $key,
            '$or' => [
                ['ttl' => ['$gt' => new BSONUTCDateTime($this->currentTimestamp() * 1000)]],
                ['ttl' => null]
            ]
        ];
    }