Register master_key as plugins.ssreflect.master_key.
Register locked as plugins.ssreflect.locked.

(* Specifications: *)
Lemma lock A x : x = locked x :> A. Proof. unlock; reflexivity. Qed.
Ltac done :=
trivial; hnf; intros; solve
[ do ![solve [trivial | simple refine (@sym_equal _ _ _ _); trivial]
| discriminate | contradiction | split]
| match goal with H : ~ _ |- _ => solve [case H; trivial] end ].