Can someone tell me the name of this joint lock?
Here is a still of the final position:
It seems to be an Aikido technique (is it?) .
It's hard to tell, but it looks like the dude on the right's left arm is pushed up behind his back. I hear that called that a "chicken wing", which is similar to BJJ's "Kimura", catch-wrestling's double wrist lock, and judo's ude garami. I'm sure there's a name for it in SAMBO, and aikido too.
I say "similar to" because most of those techniques actually require a different and more effective grip. The one shown here is not secure or strong.
This is a nothing lock - it is a made for television move.
While Sherlock's thumb and index finger do lie along anterior wrist points used frequently with various wrist locks or throws (e.g. kotogaeshi in Aikido), this particular implementation is a waste of bandwidth and screen frames, it is a British version of Hollywood nonsense. Try it, and see how little control you have and how easily your opponent will be able to get out of it or nullify it.
As suggested by Dave, at most this will be a crude shoulder lock, although poorly held and not very painful as the persons hand is only halfway up their back (which most people can do with little or no discomfort).
This appears to be a shoulder-lock, secured with only Sherlock's hand, presumably for artistic purposes, i.e. to imply he is so skilled he only needs to utilise a very small amount of movement/control to subdue an opponent.
In reality, such a hold is relatively insecure since Sherlock is not securing/locking/controlling Mycroft's arm/body in any way (other than pushing the wrist up); with no 'grip' or entanglement to speak of, Mycroft could theoretically just turn clockwise and be free.
Most martial arts disciplines which teach joint locks have a staple of similar mechanical techniques (hyper-rotating the shoulder joint by winding the arm up the back) but with much more stable control of the arm, either by using both arms to control the lock in something similar to a figure four hold, or by using the other arm to control the opponent's body to some degree, preventing them from escaping.
Below are the names of some similar techniques (or techniques with one or more similar variations) in various disciplines:
And here are the names of some techniques which can attack the same joint (hyper-rotating the shoulder backwards), but are generally characterised by very different grips than one handed control of the arm (e.g. a figure-four hold):
And the following describe a similar lock secured with the legs:
1. Note: in judo joint locks are described by the means tori uses to secure the limb, and not the biomechanical action on uke's joint. The most common kind of lock affecting the shoulder in this way in judo is the most common variant of ude-garami, but since the lock in the show is held with only one hand (as opposed to ude-garami's defining figure-four hold) it should technically be described (as a variant of) te-gatame as shown in the Kodokan Kansetsu-Waza Video.
Note that in both this and the catch-wrestling variations shown, when only one hand is being used to apply the lock the other hand is very purposefully being used to restrain the opponent's body. If the other arm is not engaged as such, it is much more sensible to attempt to secure the lock with both available hands:
2. Depending on the gym, sometimes called this. Otherwise it may refer to the double-wristlock version as in Catch Wrestling, or as a catch-all term for any 'kimura-like' arm-lock applied with the opponent's arm behind their back. Or the term may have no currency at all.
Lock Aikido techniques involve first of all, the use of the attacker's own power in a clever way to turn it against him so that the lock takes place effectively.
However, on this movie, we see the performer of the technique is very awkwardly locking the wrist of the other person who was standing up and not moving (so in practice, the wrist/elbow lock will fail especially given the angle of the attack and the stable posture of the both men)
The hand of the victim is not lifted enough to the shoulders, which thing means his elbow is not enough trailed in the back: with these 2 facts, the attacker can not allow himself to handle the hand of his victim with the his thumb only, and the victim can easily free himself.
Conclusion: that has nothing to do with martial arts.
In the Takagi-ryū of classical jūjutsu this could be considered a variation of "Ōgyaku dori". Some variants include having the arm collapsed behind the back like in the presented image and GIF. While other versions keep the arm streight or only slightly bent in order to initiate an elbow lock or even a throw.
Pretty much every tradition or practice will have either a similar name or it's own name altogether.
What is demonstrated by the clip is not a martial art technique. I would say it's a street technique for some dude who wants to be a make shift wrestler or martial artist. You know the tough guy who thinks he is the big kid on campus but has NO LEGIT TRAINING. I say this because almost ANY LEGIT martial artist would escape this bs "lock" as you called it in seconds.