UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nu4R3Gs5KUcMPidVlOYC/yVYJJxZF2sMnXEq6TdHxeg=' 
WHERE 
  key_id = '363f192c05426eae399ad860fbbb935332c1f2c7ea8f2d7feade8df2a4a781f1' 
  AND (
    token = 'nu4R3Gs5KUcMPidVlOYC/yVYJJxZF2sMnXEq6TdHxeg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022