Borrowing costs for long-term US government debt jumped past 5% for the first time in 18 months, before retreating.