UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qu/4xoQc98aUZ6zNKVs9ePEkvonlddU4xQVZMsQDh/4=' 
WHERE 
  key_id = 'cfb0ca51592c1ef3c43d658e6d4c9be07e8fb463b7cb7f1f39b33493817e74ef' 
  AND (
    token = 'qu/4xoQc98aUZ6zNKVs9ePEkvonlddU4xQVZMsQDh/4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029