UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9jQInwSS/5uBlrmB6Qeq3mxMhVgMqMEXgWnhF9eqVQs=' 
WHERE 
  key_id = '8dcbc8767a6154763bb23fcea950925b3ddc0f24815e79799bff1dd3f89878bb' 
  AND (
    token = '9jQInwSS/5uBlrmB6Qeq3mxMhVgMqMEXgWnhF9eqVQs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030