UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GkTf7YlMj6DFu3rWqSJe2PP6HGLAypMB/85T0AUPNV8=' 
WHERE 
  key_id = '44f2f7da2537675039f57b9b3cb0c3daccbe31d7aa14341049ece9d47731a0ef' 
  AND (
    token = 'GkTf7YlMj6DFu3rWqSJe2PP6HGLAypMB/85T0AUPNV8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031