docs: private static long toMillis(long duration, TimeUnitValue unit) {
        if (duration > 0) {
           long milliseconds = unit.toTimeUnit().toMillis(duration);
           if (milliseconds > MILLISECONDS_IN_30_DAYS) {
              long unixTimeExpiry = milliseconds - System.currentTimeMillis();
              return unixTimeExpiry < 0 ? 0 : unixTimeExpiry;
           } else {
              return milliseconds;
           }
        } else {
           return duration;
        }
     }