PSQL Node "Syntax Error" at UPDATE

Hi everybody, does anybody knows why I'm Getting this error in postgres node?

The error is:

Blockquote "error: syntax error at or near "WHERE""

The node Query is:

UPDATE public.km_tracker
SET km = {{msg.payload.km}}
WHERE timestamp = {{msg.payload.timestamp}};

This Query below shares the same message as input.

INSERT INTO public.km_tracker (timestamp, days, km)
VALUES ({{msg.payload.timestamp}}, {{msg.payload.day}}, {{msg.payload.km}});

These 2 do not share the same message input

DELETE FROM public.km_tracker
WHERE timestamp = {{msg.payload}};
SELECT to_char(to_timestamp((timestamp/1000)+5000),'yyyy-mm-dd') as date , km 
FROM "km_tracker"
WHERE km >= 1000
ORDER BY timestamp DESC;

The query is working but I'm Getting the error and it prevents another part of the flow to work because of the Error Exception.
The Create and Delete are very similar but doesn't raise and error.

I've tried changing the "{{" to different combinations but it still raises the error.

Thanks in advance