UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WbsLOcCDJtkBEL+vsG3VMHCZhKo/p6y9Bf12ZPJg0Bs=' 
WHERE 
  key_id = '43dc6abb46ff622ba7238665114e38d12164075cffbcfc0f6fb94a5cfa7c289e' 
  AND (
    token = 'WbsLOcCDJtkBEL+vsG3VMHCZhKo/p6y9Bf12ZPJg0Bs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022