public MultiVersionedKeyQuery<K, V> toTime(final Instant toTime) {
        return new MultiVersionedKeyQuery<>(key, fromTime, Optional.ofNullable(toTime), order);
    }
Specifies the ending time point for the key query.
The key query returns all the records that have timestamp &lt;= toTime.

@param toTime The ending time point
If @param toTime is null, will be considered as positive infinity, ie, no upper bound
streams/src/main/java/org/apache/kafka/streams/query/MultiVersionedKeyQuery.java