How can I set a random timestamp for a row based on a columns value in mysql?
I like to check out a computed column as part of a read only select first just to make sure it shows the values I'd expect.

SELECT *
    ,UNIX_TIMESTAMP(created_at) + FLOOR(0 + (RAND() * 28800)) as ended_at_new
        from streams
            WHERE ended_at IS NULL


If you see the correct variation and values you were expecting to see then your update query will work fine.

For extra protection you could run the update in a transaction:

begin tran;

UPDATE streams SET ended_at = FROM_UNIXTIME(
        UNIX_TIMESTAMP(created_at) + FLOOR(0 + (RAND() * 28800))
    )
    WHERE ended_at IS NULL

select count(ended_at) where ended_at IS NULL #should see 0

select * from streams limit 0, 1000; #add better filters to correctly identify records you want to check

rollback tran;


If you are happy with what you saw, change the rollback to commit and run it again.