Glasses Guide gives you a trade guide price, not a part exchange price. NB the word "guide" too. It's not a bible I'd be biting off the dealers hand who offered you £5.7k though!
£4,000 sprung to mind with me instinctively, £5,700 sounds like a very good shout indeed! But then I know very little about these cars, and am always shocked at how much book small Toyotas carry; the Yaris for example is an expensive car and not particularly good value.