Tickets can be non issued within one hour at the ticket office, regardless to whether it was sold there or at the TVM, as the ticket office staff will know the code on the ticket for the TVM machines.
If a train has a cancellation then I think the one hour rule can be moved with discretion...