sqlStmt = (
    'UPDATE apps.sometable SET lastmod=SYSDATE() where rec_id in (%s)' %
    ', '.join(['?' for n in record_ids]))
mysql_cursor.execute(sqlStmt, record_ids)
mysql.commit()
Automagically expanding a Python list with formatted output