The most common lookup on the bandana table is to look up entries by context & key together. However, there is index on this pair of columns, although they both have individual indices. It would seem better to drop the index on key alone and replace it with one on context + key.
There is a long-standing open issue to create a unique constraint on
CONF-7787 which would also make a lot of sense, but may be more difficult since we would have to handle (or delegate to support) any existing duplicates.