MySQL: SELECT to local variable in stored procedure
The problem was my declared local variable id.
After I changed her name, everything worked just fine.
My previous answer was:
I don't know what the problem was, but I did found a solution.
I wrote:
    SELECT MIN(ID) FROM WORKER WHERE CARDNUMBER = cardUID INTO @workerId;
    SELECT @workerId;

instead of
    SET @workerId = (SELECT MIN(ID) FROM WORKER WHERE CARDNUMBER = cardUID);
    SELECT @workerId;