UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/5zq/3MuwsfKnN+rZOxX2KbLw0bgM3ZHC8aZ4BkidBg=' 
WHERE 
  key_id = 'fabaa2bae61b3fb255d9b5f7708b9394d088bb5b7f65c72b496e18aa3cea46bc' 
  AND (
    token = '/5zq/3MuwsfKnN+rZOxX2KbLw0bgM3ZHC8aZ4BkidBg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019