You only need to execute the logic below if x ne expired and x ne cancelled.

    get match {
      case `expired` | `cancelled` => ()
      case other => ...
    }