Shoot your leg through.
Can't shoot your leg through, place your foot flat on mat
Can't place your foot flat, peel their inside leg
Can't peel their inside leg, peel the outside leg off the hip (shouldn't have let it get their anyway, but if you're here it probably happened)
Can't peel the outside leg, kick their arm away with your free leg (not an option in double trouble, but if it's a straight lock you're good)
Can't kick their arm away, roll outside
Can't roll outside, just tap because if you've tried all of that and can't get out of the ankle lock, they're just better than you and you should be grateful that they let it go.