hi there, you could use a If node before the queue to SG node, and check the current router queue time for that SG, and if it's above the threshold, then you could re-route the calls to elsewhere.
Not sure if this is what you need to know.
Another thing you could do is to put some MOH and then re-check the router call queue time whilst they are in queue, but seems to me that this is not a good idea, as when a call has entered the queue, I remember that it's against Ofcom's (in the UK at least) to terminate the call, which means you have to serve it.
Hope this helps,
Jon