I would like to do the same thing.
I just restored my keymaster account after an administrator accidentally deleted it.
I managed to do this by editing the bbpcapabilities row in the bbpusermetadata table to read a:1:{s:9:”keymaster”;b:1;}
But something like this shouldn’t be possible in the first place. Keymaster is the highest role and it should be impossible for an administrator to change anything to a keymaster’s account. Just like a moderator can’t change an administrator’s account.
Any ideas anyone?