UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'H/aThpJJ1d41dtNqnmJuRcgWUNYPTkYKhVa7HtoWgYI=' 
WHERE 
  key_id = '3ac88e5e18b2c4ced4f94cf0a1a71d916b7dc544a475ba91b667f6d6023e616d' 
  AND (
    token = 'H/aThpJJ1d41dtNqnmJuRcgWUNYPTkYKhVa7HtoWgYI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035