MySql - is possible that performance issues are caused by dynamic SQL?
Good news - it seems dynamic SQL is NOT a bottleneck.

The solution was to change temp tables to MEMORY engine. 
It did the trick and made AMAZING difference. Solution was suggested in 

Can MySql nested SP be a bottleneck?

create temporary table areas (
    id int not null,
    code varchar(30),
    name varchar(100),
    shortName varchar(100),
    levelid int not null,
    sortOrder int not null,
    key (id)
) ENGINE=MEMORY;