A peer has warned Lords against being on the “wrong side of history” as he urged them to support the resentencing of prisoners being held on indeterminate sentences.