UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VBf/WZK/dBtYFpGN+dBWzQrYwgCpz3gSRZ/i7ysBSOk=' 
WHERE 
  key_id = '43bf5d1dcbb47b36c986f14fc939d3adf1530276fd568bf0b95f311d0f957f6b' 
  AND (
    token = 'VBf/WZK/dBtYFpGN+dBWzQrYwgCpz3gSRZ/i7ysBSOk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029