Hello,
Why don't you try to use a Java node to run the query, catch possible exceptions and set a flag in the execution. You could then add a decision node which either routes the execution to its normal way or to a tempoparly 'DB query failure' state which has a timed transition that leads back to the first node.
Regards,
Peter