Avoid scanning all ttl entries by stopping at first non-expired entry

ttl entries are kept sorted by value with a priority-map