12.01.2017, 09:48
You don't need STR_TO_DATE, date value must be a string. This should work, note the double quotes for date value.
Code:
dbcon:execute('INSERT INTO sensor_data (LAST_UPDATE) VALUES ("' .. curdatetime .. '")')