UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '60ox3dPeUZbz+5HV5YGrSGRWXFHiG92HsG98RO3c130=' 
WHERE 
  key_id = '6a5f47b91a8c46bcd679a5f6c2326cb3300f8ee01946b42bded533b292e1fc8c' 
  AND (
    token = '60ox3dPeUZbz+5HV5YGrSGRWXFHiG92HsG98RO3c130=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024