UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4nEtcXgp4MZR75itQVxSXKUnt/kwPfSKhaWf5nZtzzw=' 
WHERE 
  key_id = '3d4ce98e88059b79403a10bad4bf966c997a97cc1579fd2a902c6cc0ef80d937' 
  AND (
    token = '4nEtcXgp4MZR75itQVxSXKUnt/kwPfSKhaWf5nZtzzw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027