Clue: Imprisoned owing to sentence made at the last minute (2,3,4,2,4)
Answer: IN THE NICK OF TIME
Explanation: Imprisoned owing to sentence made at the last minute (2,3,4,2,4) 
IN THE NICK OF (owing to) TIME