UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LuoqRB+SDVn3hXRR/XVz20MAOO7HUk2djGs8ExBeO4w=' 
WHERE 
  key_id = 'ff001fa3c66a5f202a0d0b7fa137ac5e46bb6f6b84d508d094d3aa5dcc74cd35' 
  AND (
    token = 'LuoqRB+SDVn3hXRR/XVz20MAOO7HUk2djGs8ExBeO4w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031