Sets new data into the session, and marks it as temporary data
with a set lifespan.

@param string|array $data  Session data key or associative array of items
@param null         $value Value to store
@param integer      $ttl   Time-to-live in seconds