<dtml-comment>
title:
connection_id:cmf_activity_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>table
uid:list
retry
delay
</params>
UPDATE
  <dtml-var table>
SET
  date = DATE_ADD(UTC_TIMESTAMP(), INTERVAL
    <dtml-sqlvar delay type="int"> SECOND)
<dtml-if expr="retry is not None">
  , priority = priority + <dtml-sqlvar retry type="int">
  , retry = retry + <dtml-sqlvar retry type="int">
</dtml-if>
WHERE
  <dtml-sqltest uid type="int" multiple>
