UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '44aVJbxkYhBVXB6TqEzn0KsYfkV/23LJ4efauY0ht3k=' 
WHERE 
  key_id = '16891106769366a43dd955c6b5e3640b3f49e2a6b0cad6f72a59fc4e0f5b8dda' 
  AND (
    token = '44aVJbxkYhBVXB6TqEzn0KsYfkV/23LJ4efauY0ht3k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036