This merger statement goes into a race with itself, i.e. your API is called by one client, and both times the merge operator does not find the string, so it inserts it. The merger is not an atomic operation, although it is reasonable to assume that this is so. For example, see this error report for SQL 2008, for a merge that causes deadlocks, the SQL server team stated that it was by design.
From your post, I think the immediate problem is that your customers will potentially receive a small amount of free hits in your API. For example, if two requests come in and no lines are visible, you start with two lines with a score of 1, when you really need one line with a score of 2, and the client can end up with 1 free API address on that day. If the three requests intersect, you will receive three lines with a score of 1, and they can receive 2 free calls to the API, etc.
Edit
Since your link assumes that you have two categories of parameters that you could study, first try and make it on the SQL server, and secondly, other architectural solutions.
For the SQL option, I would end the merge and consider pre-populating your clients ahead of schedule, at night, or less often for several days at a time, this will leave you with one update instead of merging / updating and pasting. Then you can confirm that your update and your choice are fully optimized, i.e. Have the required index and that they do not cause a scan. Then you can look at the lock lock so that you only capture the row level, see this for more information. You can also take a look at using NOLOCK for selection, which means you can get a little bit of incorrect data, but it doesn’t matter in your case, you will use WHERE, which also targets a single line.
For parameters other than SQL, since your link says that you can look at the queue in the queue, obviously these will be updates / inserts, so your selections will see old data. This may or may not be acceptable depending on how far apart they are, although you could have it as a “final consistent” solution if you wanted to be strict and charge extra or remove API attacks the next day or something like that. You can also see the caching options for storing counters, this will become more complicated if your application is distributed, but there are caching solutions for this. If you set off with caching, you could refuse something, but then you could refuse to download free hits if your site crashed, but you probably would have big problems to worry about this in any case!