We were able to fix this by using the following Trigger and Reset conditions:
That may not fix everything you're looking for, but for us it got rid of the BGP Down alerts hanging around hours after the neighbor relations had been re-established.
Obviously - ignore the node and IP exclusions that were specific to our network.
You can accomplish what you are looking to do by using a Custom Table. I'd love to see the query you use that satisfies your needs if you could share when you are done