You forgot to add the condition: WHERE SUBSTR(column, -1, 1) = ','
Quassnoi caught another issue - REPLACE returns null - you can't use it inside the "set"
Full sql:
UPDATE table SET column = SUBSTR(column, 0, length(column)-1)
WHERE SUBSTR(column, -1, 1) = ',';
This will make sure you're doing the substitute only in rows that has values that ends with ","