How to include values in a MySQL sum based on a conditional statement?
Conditionals can be done by means of the CASE operator/expression:

Your query will work with:

SELECT 
    ts, 
    (CASE WHEN column_5 &gt; 0 
     THEN
        0              /* We are ignoring column_1 */
     ELSE
        column_1       /* We are using its value */
     END) + column_2 + column_3 + column_4 AS total
FROM
    t
ORDER BY 
    ts ;


You can check it at http://rextester.com/IHM39024 

The CASE expression is standard SQL. 

MySQL also offers an IF function that could be used in this case. In fact IF(a,b,c) = CASE WHEN a THEN b ELSE c END.