Update MySQL stored procedure and unit test for new cloud message format / database schema.