Update several values from several ID's
There's a bug or maybe lack of functionality in various versions of MariaDB/MySQL that prevents update of a table that's part of a sub-select. Small example:

create table A (x int not null, y int not null);
insert into A (x,y) values (1,1),(2,2),(3,3);
update A set y = 5 where x in ( 
    select x from A where y in (1,2) 
);
ERROR 1093 (HY000): Table 'A' is specified twice, both as a target for 'UPDATE' and as a separate source for data


You can fool the DBMS by hiding the table in a nested table

update A 
    set y = 5 
where x in (
    select x from ( 
        select x from A where y in (1,2) 
    ) as T 
);
Query OK, 2 rows affected (0.01 sec)


MySQL on the other hand supports a non standard update where you can update a join, but since you did not provide create table statements I'll leave that out of the answer (I'm too lazy to figure out what your tables look like :-)