The Hungary captain had entered the last two years of his previous deal but will now be at Anfield for the next five