The 37-year-old former Republic of Ireland international is due to return to Villa Park after Wednesday's trip to Bolton.
But the Teessiders are hoping to strike a new deal to keep him until the end of the season with Jason Steele still recovering from an ankle injury.
Manager Aitor Karanka told the club's official website: "Everybody is clear - I want to keep him, he wants to stay and the club is working for Shay to stay here.
"We are working hard because everyone knows how important Shay is for us, not just now we are winning games, but he's also important in the changing room. He transmits a lot of experience throughout the defence."
Asked if he was confident of reaching an agreement, Karanka said: "I hope so because when I want it and Shay wants and everyone wants it, I hope it will be easy.
"The most important thing is Shay is happy here and playing and we hope he can stay here for the rest of the season."