To eliminate an Asterisk problem, I sugest trying to execute this query from the mysql command line to make sure there is no typo or a conflict with your tables structure.
Also check your Asterisks log file for errors that might shed light on the situation
I always terminate each query with a semicolon, but I don’t know if this is required in Asterisk.
writesql=UPDATE DID_Numbers SET `ForwardedTo`=${SQL_ESC(${VAL2})} WHERE (`TN`='${SQL_ESC(${VAL1})}');
I call it as
Set(ODBC_SETFWD()=${TN},${DESINATION})