For some reason I got the error in MySql: You can't specify target table 'location' for update in FROM clause
UPDATE location
SET
lat = 37.05,
lng = - 122.05,
power = 90,
speed = 90,
utc = '155',
gmt = '156'
WHERE
location.index IN (SELECT
MAX(location.index)
FROM
location
WHERE
location.truckid = '1480c667-0bc9-3c60-85f3-6de3b6cd5ad4');
What did I do wrong?