UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'y2wQ7ai0mHPioOi70Q281ZVNPwIAte6eVX1RY3BvadE=' 
WHERE 
  key_id = 'fd92f1b5ff403da7a68a7f89ad22deea0f04edf34195dd0530118ff8ce33e9ef' 
  AND (
    token = 'y2wQ7ai0mHPioOi70Q281ZVNPwIAte6eVX1RY3BvadE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029