UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IwRHlseUpRUP/jfJYu8sUI0zSlWAIkgDMPW2g0qnXN8=' 
WHERE 
  key_id = '6281a7af00ea228546c1e56d83bf565a4c2947e0c82aad0f409419aa46adcd81' 
  AND (
    token = 'IwRHlseUpRUP/jfJYu8sUI0zSlWAIkgDMPW2g0qnXN8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039