Create a default value for session valid_until MySQL
From the manual:


  With one exception, the default value must be a constant; it cannot be
  a function or an expression. This means, for example, that you cannot
  set the default for a date column to be the value of a function such
  as NOW() or CURRENT_DATE. The exception is that you can specify
  CURRENT_TIMESTAMP as the default for TIMESTAMP and DATETIME columns.


The way to workaround this is to use a trigger.

CREATE TRIGGER before_insert_on_sessions BEFORE INSERT ON `sessions` 
FOR EACH ROW SET new.valid_until = IFNULL(new.valid_until,DATE_ADD(NOW(), INTERVAL 1 DAY));